class Person {
  constructor(public name: string) {
    this.name = name;
  }
  getName() {
    console.log("fu" + this.name);
    return this.name;
  }
}

class Student extends Person {
  constructor(name, public age) {
    super(name);
  }

  public getName(): string {
    console.log("zi" + this.name);
    return super.getName();
  }
}

const men = new Person("1231");

men.getName();

const zs = new Student("zs", "1212");

zs.getName();

class Animal {
  constructor(public name) {
    this.name = name;
  }

  run() {
    return `${this.name} is running`;
  }
}

class Cat extends Animal {
  constructor(name, public age) {
    super(name);
    this.age = age;
  }
  run() {
    // this.run();
    console.log("run", super.run());
    return super.run();
  }
}

const Tom = new Cat("Tom", 2);
Tom.run();
